/**
 * @param {string} s
 * @return {string}
 */
 var greatestLetter = function(s) {
  let res = ''
  for (let index = 0; index < s.length; index++) {
    if(s.includes(s[index].toLowerCase())&& s.includes(s[index].toUpperCase())){
      if(s[index].toUpperCase()>res){
        res = s[index].toUpperCase()
      }
    }
  }
  return res
};

greatestLetter('arRAzFif')
